// import { Canceler } from 'axios';
import { pget, ppostJson } from '@/utils/req';
import { modalApi } from '@/utils/modalReq';

// 获取供应商招投标列表
export function getSupplierbiddingList(query?: any) {
  return pget(`${modalApi.supplier}/supplierbidding/page`, query);
}

// 新增供应商招投标
export function addSupplierbidding(data: any) {
  return ppostJson(`${modalApi.supplier}/supplierbidding/save`, data);
}

// 修改供应商招投标
export function editSupplierbidding(data: any) {
  return ppostJson(`${modalApi.supplier}/supplierbidding/update`, data);
}

// 查看供应商招投标详情
export function supplierbiddingInfo(id: string) {
  return pget(`${modalApi.supplier}/supplierbidding/detail/${id}`);
}

// 删除供应商准入
export function deleteSupplierAccess(id: string) {
  return ppostJson(`${modalApi.supplier}/supplier/currency/remove/${id}`);
}

/** 获取导入失败列表 */
export function getSupplierBaseExcelList(query?: any) {
  return pget(`${modalApi.supplier}/supplierbidding/getBiddingExcel`, query);
}

/** 保存招投标导入数据 */
export function getImportSupplierBidding(query?: any) {
  return pget(
    `${modalApi.supplier}/supplierbidding/importSupplierBidding`,
    query,
  );
}
